import request from '@/utils/request'

export function getUserList(data) {
  return request({
    url: '/api/emp/list',
    method: 'GET',
    params: data
  })
}
export function getEmpInfo(id) {
  return request.get(`/api/emp/info/${id}`)
}

export function getCurWorkWeekRecord(id) {
  return request.get(`/api/emp/getCurWorkRecord/${id}`)
}

export function getCurWorkMonthRecord(id) {
  return request.get(`/api/emp/getCurMonthRecord/${id}`)
}

export const deleteUser = (data) => {
  return request({
    url: '/api/emp/batchDelete',
    method: 'POST',
    data
  })
}
export const addUser = (data) => {
  return request({
    url: '/api/emp/add',
    method: 'POST',
    data
  })
}
export const updateUser = (data) => {
  return request({
    url: '/api/emp/edit',
    method: 'POST',
    data
  })
}

// 导出
export const exportUserExcel = (data) => {
  return request({
    url: '/sys/user/export',
    method: 'GET',
    params: data,
    responseType: 'blob'
  })
}

export function deptGetChannelsService() {
  return request({
    url: '/sys-dept/list',
    method: 'GET'
  })
}
